#include "StdAfx.h"
#include "UIGroupbox.h"
#include "UIGlobalStyle.h"

CUIGroupBox::CUIGroupBox( HWND hWnd ): CUIControl( hWnd )
{

}


CUIGroupBox::~CUIGroupBox( void )
{

}

void CUIGroupBox::OnDraw( HDC hDC )
{
//	CUIControl::DefaultWindowProc(WM_PAINT,(WPARAM)hDC,0);
    RECT rcClient = {0};
    ::GetClientRect( GetHwnd(), &rcClient );
    COLORREF clr = IsEnable() ? CUIGlobalStyle::GetEdgeLightColor() : CUIGlobalStyle::GetEdgeDkShadowColor();
    HPEN hPen =::CreatePen( PS_SOLID, 1, clr );
    HPEN hOldPen = ( HPEN )::SelectObject( hDC, hPen );
    ::SelectObject( hDC, ::GetStockObject( NULL_BRUSH ) );
    ::Rectangle( hDC, rcClient.left, rcClient.top, rcClient.right, rcClient.bottom );
    ::SelectObject( hDC, hOldPen );
    ::DeleteObject( hOldPen );
    ::DeleteObject( hPen );
}

LRESULT CUIGroupBox::ProcessUIMsg( UINT uMsg, WPARAM wParam, LPARAM lParam )
{
    return CUIControl::ProcessUIMsg( uMsg, wParam, lParam );
}
